package com.chen.gulimall.gulimallproduct.exception;

import com.chen.gulimallcommon.common.exception.ExceptionCodeEnum;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ProductExceptionAdvice {

    //将参数效验错误的错误信息抛出给此函数执行
    @ExceptionHandler(value = Exception.class)
    public void excepHandle(Exception e) {
        ExceptionCodeEnum.UNKKNOW_EXCEPTION.getCode();
        ExceptionCodeEnum.UNKKNOW_EXCEPTION.getMessage();
    }
}
